The talk will be structured into three parts:
Once apon a time, there was a wizard that introduced editor support to OCaml.
Merlin is the backend for OCaml's language server.
It brings editor support to OCaml.
We'll explain two concepts:
A domain in OCaml is a parallel execution unit that has its own minor heap, and execution stack. Domains allow OCaml programs to run code in parallel on multiple CPU cores without a global runtime lock.
(imagine a visualization)
An effect is an operation in a program that can suspend the linear flow of execution and delegate control to an external handler to decide how to proceed.
An effect handler captures and defines the behavior of effects when they are performed. It has access to the continuation (the rest of the computation).
(imagine code snippet building up)
By now, we've explained two things:
It sounded like a horrible idea to use the new multicore paradigm on Merlin.
So, we did it anyways! :)
Spoiler: It has worked surprisingly well!
Bonus: We'll point out interesting aspects of OCaml as we go.